package com.dao.front.Impl;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.dao.BaseDao;
import com.dao.front.MusicFrontQueryDao;
import com.entity.Query.MusicQuery;
import com.entity.front.MusicFrontQuery;
import com.util.MyUtil;

@Repository
public class MusicFrontQueryDaoImpl extends BaseDao implements MusicFrontQueryDao{

	@Override
	public List<Map<String, Object>> queryMusicQuery(MusicFrontQuery musicFrontQuery) {
		String sql ="select mu.musicId,mu.musicName,mu.musicMp3,si.singerName,sp.specialName,mu.timeLength,si.singerId,sp.specialId "
				+ " from music as mu "
				+ " join special as sp on mu.specialId=sp.specialId "
				+ " join singer as si on mu.singerId=si.singerId "
				+ " where mu.musicName like ? ";
		Object[] params={musicFrontQuery.getMusicName()};
		return executeQuery(sql, params);
	}
	
}
